#include "average_ground_seg.h"
namespace perception
{
    namespace lidar_preprocess
    {
        template <typename T1, typename T2, typename T3>
        void GroundSegRing<T1, T2, T3>::Process(typename pcl::PointCloud<T1>::Ptr &data_in, typename pcl::PointCloud<T2>::Ptr &data_out, T3 &config)
        {
            if (data_in->points.empty())
            {
                WARN("no lidar points input");
                return;
            }
            typename pcl::PointCloud<T2>::Ptr no_ground_points(new pcl::PointCloud<T2>);
            typename pcl::PointCloud<T2>::Ptr ground_points(new pcl::PointCloud<T2>);

            if (config.get_ground_points)
                data_out = ground_points;
            else
                data_out = no_ground_points;
        }

    }
}